package imper.main.listener;

import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.state.transition.EmptyTransition;

import imper.graphic.ButtonListener;
import imper.graphic.event.ClickEvent;

public class ChangeViewListener implements ButtonListener
{
	protected Integer _StateIDDest;
	protected StateBasedGame _sbg;
	
	public ChangeViewListener(Integer pStateIDDest,StateBasedGame pSbg)
	{
		this._StateIDDest = pStateIDDest;
		this._sbg = pSbg;
	}

	@Override
	public void click(ClickEvent pEvent)
	{		
		_sbg.enterState(_StateIDDest, new EmptyTransition(), new EmptyTransition()); 
	}
}
